package bjtu.tjj.simpledy.exception;

import bjtu.tjj.simpledy.common.ResultCode;

public class CommonException extends RuntimeException {
    public final ResultCode code;

    public CommonException() {
        this(ResultCode.FAILED);
    }

    public CommonException(ResultCode code) {
        this.code = code;
    }

    @Override
    public String toString() {
        return "CommonException(code=%s)".formatted(code);
    }
}
